package com.yimi.policyservice.configs;


import com.yimi.policyservice.utils.Annotation.MyBatisRepository;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MapperScannerConfig {

	// mapper接口的扫描器
	@Bean
	public MapperScannerConfigurer mapperScannerConfigurer() {
		MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();

		mapperScannerConfigurer.setBasePackage("com.yimi.policyservice.dao");
		mapperScannerConfigurer.setAnnotationClass(MyBatisRepository.class);
		return mapperScannerConfigurer;
	}

}

